﻿using System;
using System.ComponentModel;
using System.IO;
using System.Runtime.Serialization;

namespace HalconDotNet
{
	/// <summary>Represents an instance of a camera calibration model.</summary>
	// Token: 0x0200001D RID: 29
	[Serializable]
	public class HCalibData : HHandle, ISerializable, ICloneable
	{
		// Token: 0x060001BA RID: 442 RVA: 0x0000883B File Offset: 0x00006A3B
		[EditorBrowsable(EditorBrowsableState.Never)]
		public HCalibData() : base(HHandleBase.UNDEF)
		{
		}

		// Token: 0x060001BB RID: 443 RVA: 0x0000A02F File Offset: 0x0000822F
		[EditorBrowsable(EditorBrowsableState.Never)]
		public HCalibData(IntPtr handle) : base(handle)
		{
			this.AssertSemType();
		}

		// Token: 0x060001BC RID: 444 RVA: 0x0000A03E File Offset: 0x0000823E
		[EditorBrowsable(EditorBrowsableState.Never)]
		public HCalibData(HHandle handle) : base(handle)
		{
			this.AssertSemType();
		}

		// Token: 0x060001BD RID: 445 RVA: 0x0000A04D File Offset: 0x0000824D
		private void AssertSemType()
		{
			base.AssertSemType("calib_data");
		}

		// Token: 0x060001BE RID: 446 RVA: 0x0000A05A File Offset: 0x0000825A
		internal static int LoadNew(IntPtr proc, int parIndex, int err, out HCalibData obj)
		{
			obj = new HCalibData(HHandleBase.UNDEF);
			return obj.Load(proc, parIndex, err);
		}

		// Token: 0x060001BF RID: 447 RVA: 0x0000A074 File Offset: 0x00008274
		internal static int LoadNew(IntPtr proc, int parIndex, int err, out HCalibData[] obj)
		{
			HTuple htuple;
			err = HTuple.LoadNew(proc, parIndex, err, out htuple);
			obj = new HCalibData[htuple.Length];
			for (int i = 0; i < htuple.Length; i++)
			{
				obj[i] = new HCalibData(HalconAPI.IsLegacyHandleMode() ? htuple[i].IP : htuple[i].H);
			}
			htuple.Dispose();
			return err;
		}

		/// <summary>
		///   Restore a calibration data model from a file.
		///   Modified instance represents: Handle of a calibration data model.
		/// </summary>
		/// <param name="fileName">The path and file name of the model file.</param>
		// Token: 0x060001C0 RID: 448 RVA: 0x0000A0E4 File Offset: 0x000082E4
		public HCalibData(string fileName)
		{
			IntPtr proc = HalconAPI.PreCall(1963);
			HalconAPI.StoreS(proc, 0, fileName);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Create a HALCON calibration data model.
		///   Modified instance represents: Handle of the created calibration data model.
		/// </summary>
		/// <param name="calibSetup">Type of the calibration setup. Default: "calibration_object"</param>
		/// <param name="numCameras">Number of cameras in the calibration setup. Default: 1</param>
		/// <param name="numCalibObjects">Number of calibration objects. Default: 1</param>
		// Token: 0x060001C1 RID: 449 RVA: 0x0000A130 File Offset: 0x00008330
		public HCalibData(string calibSetup, int numCameras, int numCalibObjects)
		{
			IntPtr proc = HalconAPI.PreCall(1980);
			HalconAPI.StoreS(proc, 0, calibSetup);
			HalconAPI.StoreI(proc, 1, numCameras);
			HalconAPI.StoreI(proc, 2, numCalibObjects);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		// Token: 0x060001C2 RID: 450 RVA: 0x0000A18C File Offset: 0x0000838C
		void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
		{
			HSerializedItem hserializedItem = this.SerializeCalibData();
			byte[] value = hserializedItem;
			hserializedItem.Dispose();
			info.AddValue("data", value, typeof(byte[]));
		}

		// Token: 0x060001C3 RID: 451 RVA: 0x0000A1C4 File Offset: 0x000083C4
		[EditorBrowsable(EditorBrowsableState.Never)]
		public HCalibData(SerializationInfo info, StreamingContext context)
		{
			HSerializedItem hserializedItem = new HSerializedItem((byte[])info.GetValue("data", typeof(byte[])));
			this.DeserializeCalibData(hserializedItem);
			hserializedItem.Dispose();
		}

		/// <summary>Serialize object to binary stream in HALCON format</summary>
		// Token: 0x060001C4 RID: 452 RVA: 0x0000A204 File Offset: 0x00008404
		public new void Serialize(Stream stream)
		{
			HSerializedItem hserializedItem = this.SerializeCalibData();
			hserializedItem.Serialize(stream);
			hserializedItem.Dispose();
		}

		/// <summary>Deserialize object from binary stream in HALCON format</summary>
		// Token: 0x060001C5 RID: 453 RVA: 0x0000A218 File Offset: 0x00008418
		public new static HCalibData Deserialize(Stream stream)
		{
			HCalibData hcalibData = new HCalibData();
			HSerializedItem hserializedItem = HSerializedItem.Deserialize(stream);
			hcalibData.DeserializeCalibData(hserializedItem);
			hserializedItem.Dispose();
			return hcalibData;
		}

		// Token: 0x060001C6 RID: 454 RVA: 0x0000A23E File Offset: 0x0000843E
		object ICloneable.Clone()
		{
			return this.Clone();
		}

		// Token: 0x060001C7 RID: 455 RVA: 0x0000A248 File Offset: 0x00008448
		public new HCalibData Clone()
		{
			HSerializedItem hserializedItem = this.SerializeCalibData();
			HCalibData hcalibData = new HCalibData();
			hcalibData.DeserializeCalibData(hserializedItem);
			hserializedItem.Dispose();
			return hcalibData;
		}

		/// <summary>
		///   Free the memory of a calibration data model.
		///   Instance represents: Handle of a calibration data model.
		/// </summary>
		// Token: 0x060001C8 RID: 456 RVA: 0x0000A270 File Offset: 0x00008470
		public void ClearCalibData()
		{
			IntPtr proc = HalconAPI.PreCall(1960);
			base.Store(proc, 0);
			int procResult = HalconAPI.CallProcedure(proc);
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Deserialize a serialized calibration data model.
		///   Modified instance represents: Handle of a calibration data model.
		/// </summary>
		/// <param name="serializedItemHandle">Handle of the serialized item.</param>
		// Token: 0x060001C9 RID: 457 RVA: 0x0000A2A4 File Offset: 0x000084A4
		public void DeserializeCalibData(HSerializedItem serializedItemHandle)
		{
			this.Dispose();
			IntPtr proc = HalconAPI.PreCall(1961);
			HalconAPI.Store(proc, 0, serializedItemHandle);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			GC.KeepAlive(serializedItemHandle);
		}

		/// <summary>
		///   Serialize a calibration data model.
		///   Instance represents: Handle of a calibration data model.
		/// </summary>
		/// <returns>Handle of the serialized item.</returns>
		// Token: 0x060001CA RID: 458 RVA: 0x0000A2F8 File Offset: 0x000084F8
		public HSerializedItem SerializeCalibData()
		{
			IntPtr proc = HalconAPI.PreCall(1962);
			base.Store(proc, 0);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HSerializedItem result;
			num = HSerializedItem.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Restore a calibration data model from a file.
		///   Modified instance represents: Handle of a calibration data model.
		/// </summary>
		/// <param name="fileName">The path and file name of the model file.</param>
		// Token: 0x060001CB RID: 459 RVA: 0x0000A340 File Offset: 0x00008540
		public void ReadCalibData(string fileName)
		{
			this.Dispose();
			IntPtr proc = HalconAPI.PreCall(1963);
			HalconAPI.StoreS(proc, 0, fileName);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Store a calibration data model into a file.
		///   Instance represents: Handle of a calibration data model.
		/// </summary>
		/// <param name="fileName">The file name of the model to be saved.</param>
		// Token: 0x060001CC RID: 460 RVA: 0x0000A38C File Offset: 0x0000858C
		public void WriteCalibData(string fileName)
		{
			IntPtr proc = HalconAPI.PreCall(1964);
			base.Store(proc, 0);
			HalconAPI.StoreS(proc, 1, fileName);
			int procResult = HalconAPI.CallProcedure(proc);
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Perform a hand-eye calibration.
		///   Instance represents: Handle of a calibration data model.
		/// </summary>
		/// <returns>Average residual error of the optimization.</returns>
		// Token: 0x060001CD RID: 461 RVA: 0x0000A3C8 File Offset: 0x000085C8
		public HTuple CalibrateHandEye()
		{
			IntPtr proc = HalconAPI.PreCall(1965);
			base.Store(proc, 0);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HTuple result;
			num = HTuple.LoadNew(proc, 0, HTupleType.DOUBLE, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Determine all camera parameters by a simultaneous minimization process.
		///   Instance represents: Handle of a calibration data model.
		/// </summary>
		/// <returns>Back projection root mean square error (RMSE) of the optimization.</returns>
		// Token: 0x060001CE RID: 462 RVA: 0x0000A414 File Offset: 0x00008614
		public double CalibrateCameras()
		{
			IntPtr proc = HalconAPI.PreCall(1966);
			base.Store(proc, 0);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			double result;
			num = HalconAPI.LoadD(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Remove a data set from a calibration data model.
		///   Instance represents: Handle of a calibration data model.
		/// </summary>
		/// <param name="itemType">Type of the calibration data item. Default: "tool"</param>
		/// <param name="itemIdx">Index of the affected item. Default: 0</param>
		// Token: 0x060001CF RID: 463 RVA: 0x0000A45C File Offset: 0x0000865C
		public void RemoveCalibData(string itemType, HTuple itemIdx)
		{
			IntPtr proc = HalconAPI.PreCall(1967);
			base.Store(proc, 0);
			HalconAPI.StoreS(proc, 1, itemType);
			HalconAPI.Store(proc, 2, itemIdx);
			int procResult = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(itemIdx);
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Remove a data set from a calibration data model.
		///   Instance represents: Handle of a calibration data model.
		/// </summary>
		/// <param name="itemType">Type of the calibration data item. Default: "tool"</param>
		/// <param name="itemIdx">Index of the affected item. Default: 0</param>
		// Token: 0x060001D0 RID: 464 RVA: 0x0000A4A8 File Offset: 0x000086A8
		public void RemoveCalibData(string itemType, int itemIdx)
		{
			IntPtr proc = HalconAPI.PreCall(1967);
			base.Store(proc, 0);
			HalconAPI.StoreS(proc, 1, itemType);
			HalconAPI.StoreI(proc, 2, itemIdx);
			int procResult = HalconAPI.CallProcedure(proc);
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Set data in a calibration data model.
		///   Instance represents: Handle of a calibration data model.
		/// </summary>
		/// <param name="itemType">Type of calibration data item. Default: "model"</param>
		/// <param name="itemIdx">Index of the affected item (depending on the selected ItemType). Default: "general"</param>
		/// <param name="dataName">Parameter(s) to set. Default: "reference_camera"</param>
		/// <param name="dataValue">New value(s). Default: 0</param>
		// Token: 0x060001D1 RID: 465 RVA: 0x0000A4EC File Offset: 0x000086EC
		public void SetCalibData(string itemType, HTuple itemIdx, string dataName, HTuple dataValue)
		{
			IntPtr proc = HalconAPI.PreCall(1968);
			base.Store(proc, 0);
			HalconAPI.StoreS(proc, 1, itemType);
			HalconAPI.Store(proc, 2, itemIdx);
			HalconAPI.StoreS(proc, 3, dataName);
			HalconAPI.Store(proc, 4, dataValue);
			int procResult = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(itemIdx);
			HalconAPI.UnpinTuple(dataValue);
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Set data in a calibration data model.
		///   Instance represents: Handle of a calibration data model.
		/// </summary>
		/// <param name="itemType">Type of calibration data item. Default: "model"</param>
		/// <param name="itemIdx">Index of the affected item (depending on the selected ItemType). Default: "general"</param>
		/// <param name="dataName">Parameter(s) to set. Default: "reference_camera"</param>
		/// <param name="dataValue">New value(s). Default: 0</param>
		// Token: 0x060001D2 RID: 466 RVA: 0x0000A550 File Offset: 0x00008750
		public void SetCalibData(string itemType, int itemIdx, string dataName, string dataValue)
		{
			IntPtr proc = HalconAPI.PreCall(1968);
			base.Store(proc, 0);
			HalconAPI.StoreS(proc, 1, itemType);
			HalconAPI.StoreI(proc, 2, itemIdx);
			HalconAPI.StoreS(proc, 3, dataName);
			HalconAPI.StoreS(proc, 4, dataValue);
			int procResult = HalconAPI.CallProcedure(proc);
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Find the HALCON calibration plate and set the extracted points and contours in a calibration data model.
		///   Instance represents: Handle of a calibration data model.
		/// </summary>
		/// <param name="image">Input image.</param>
		/// <param name="cameraIdx">Index of the observing camera. Default: 0</param>
		/// <param name="calibObjIdx">Index of the calibration object. Default: 0</param>
		/// <param name="calibObjPoseIdx">Index of the observed calibration object. Default: 0</param>
		/// <param name="genParamName">Names of the generic parameters to be set. Default: []</param>
		/// <param name="genParamValue">Values of the generic parameters to be set. Default: []</param>
		// Token: 0x060001D3 RID: 467 RVA: 0x0000A5A8 File Offset: 0x000087A8
		public void FindCalibObject(HImage image, int cameraIdx, int calibObjIdx, int calibObjPoseIdx, HTuple genParamName, HTuple genParamValue)
		{
			IntPtr proc = HalconAPI.PreCall(1969);
			base.Store(proc, 0);
			HalconAPI.Store(proc, 1, image);
			HalconAPI.StoreI(proc, 1, cameraIdx);
			HalconAPI.StoreI(proc, 2, calibObjIdx);
			HalconAPI.StoreI(proc, 3, calibObjPoseIdx);
			HalconAPI.Store(proc, 4, genParamName);
			HalconAPI.Store(proc, 5, genParamValue);
			int procResult = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(genParamName);
			HalconAPI.UnpinTuple(genParamValue);
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(this);
			GC.KeepAlive(image);
		}

		/// <summary>
		///   Remove observation data from a calibration data model.
		///   Instance represents: Handle of a calibration data model.
		/// </summary>
		/// <param name="cameraIdx">Index of the observing camera. Default: 0</param>
		/// <param name="calibObjIdx">Index of the observed calibration object. Default: 0</param>
		/// <param name="calibObjPoseIdx">Index of the observed calibration object pose. Default: 0</param>
		// Token: 0x060001D4 RID: 468 RVA: 0x0000A624 File Offset: 0x00008824
		public void RemoveCalibDataObserv(int cameraIdx, int calibObjIdx, int calibObjPoseIdx)
		{
			IntPtr proc = HalconAPI.PreCall(1970);
			base.Store(proc, 0);
			HalconAPI.StoreI(proc, 1, cameraIdx);
			HalconAPI.StoreI(proc, 2, calibObjIdx);
			HalconAPI.StoreI(proc, 3, calibObjPoseIdx);
			int procResult = HalconAPI.CallProcedure(proc);
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Get contour-based observation data from a calibration data model.
		///   Instance represents: Handle of a calibration data model.
		/// </summary>
		/// <param name="contourName">Name of contour objects to be returned. Default: "marks"</param>
		/// <param name="cameraIdx">Index of the observing camera. Default: 0</param>
		/// <param name="calibObjIdx">Index of the observed calibration plate. Default: 0</param>
		/// <param name="calibObjPoseIdx">Index of the observed calibration object pose. Default: 0</param>
		/// <returns>Contour-based result(s).</returns>
		// Token: 0x060001D5 RID: 469 RVA: 0x0000A670 File Offset: 0x00008870
		public HXLDCont GetCalibDataObservContours(string contourName, int cameraIdx, int calibObjIdx, int calibObjPoseIdx)
		{
			IntPtr proc = HalconAPI.PreCall(1971);
			base.Store(proc, 0);
			HalconAPI.StoreS(proc, 1, contourName);
			HalconAPI.StoreI(proc, 2, cameraIdx);
			HalconAPI.StoreI(proc, 3, calibObjIdx);
			HalconAPI.StoreI(proc, 4, calibObjPoseIdx);
			HalconAPI.InitOCT(proc, 1);
			int num = HalconAPI.CallProcedure(proc);
			HXLDCont result;
			num = HXLDCont.LoadNew(proc, 1, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Get observed calibration object poses from a calibration data model.
		///   Instance represents: Handle of a calibration data model.
		/// </summary>
		/// <param name="cameraIdx">Index of the observing camera. Default: 0</param>
		/// <param name="calibObjIdx">Index of the observed calibration object. Default: 0</param>
		/// <param name="calibObjPoseIdx">Index of the observed calibration object pose. Default: 0</param>
		/// <returns>Stored observed calibration object pose relative to the observing camera.</returns>
		// Token: 0x060001D6 RID: 470 RVA: 0x0000A6DC File Offset: 0x000088DC
		public HPose GetCalibDataObservPose(int cameraIdx, int calibObjIdx, int calibObjPoseIdx)
		{
			IntPtr proc = HalconAPI.PreCall(1972);
			base.Store(proc, 0);
			HalconAPI.StoreI(proc, 1, cameraIdx);
			HalconAPI.StoreI(proc, 2, calibObjIdx);
			HalconAPI.StoreI(proc, 3, calibObjPoseIdx);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HPose result;
			num = HPose.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Set observed calibration object poses in a calibration data model.
		///   Instance represents: Handle of a calibration data model.
		/// </summary>
		/// <param name="cameraIdx">Index of the observing camera. Default: 0</param>
		/// <param name="calibObjIdx">Index of the calibration object. Default: 0</param>
		/// <param name="calibObjPoseIdx">Index of the observed calibration object. Default: 0</param>
		/// <param name="objInCameraPose">Pose of the observed calibration object relative to the observing camera.</param>
		// Token: 0x060001D7 RID: 471 RVA: 0x0000A73C File Offset: 0x0000893C
		public void SetCalibDataObservPose(int cameraIdx, int calibObjIdx, int calibObjPoseIdx, HPose objInCameraPose)
		{
			IntPtr proc = HalconAPI.PreCall(1973);
			base.Store(proc, 0);
			HalconAPI.StoreI(proc, 1, cameraIdx);
			HalconAPI.StoreI(proc, 2, calibObjIdx);
			HalconAPI.StoreI(proc, 3, calibObjPoseIdx);
			HalconAPI.Store(proc, 4, objInCameraPose);
			int procResult = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(objInCameraPose);
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Get point-based observation data from a calibration data model.
		///   Instance represents: Handle of a calibration data model.
		/// </summary>
		/// <param name="cameraIdx">Index of the observing camera. Default: 0</param>
		/// <param name="calibObjIdx">Index of the observed calibration object. Default: 0</param>
		/// <param name="calibObjPoseIdx">Index of the observed calibration object pose. Default: 0</param>
		/// <param name="row">Row coordinates of the detected points.</param>
		/// <param name="column">Column coordinates of the detected points.</param>
		/// <param name="index">Correspondence of the detected points to the points of the observed calibration object.</param>
		/// <param name="pose">Roughly estimated pose of the observed calibration object relative to the observing camera.</param>
		// Token: 0x060001D8 RID: 472 RVA: 0x0000A7A4 File Offset: 0x000089A4
		public void GetCalibDataObservPoints(int cameraIdx, int calibObjIdx, int calibObjPoseIdx, out HTuple row, out HTuple column, out HTuple index, out HTuple pose)
		{
			IntPtr proc = HalconAPI.PreCall(1974);
			base.Store(proc, 0);
			HalconAPI.StoreI(proc, 1, cameraIdx);
			HalconAPI.StoreI(proc, 2, calibObjIdx);
			HalconAPI.StoreI(proc, 3, calibObjPoseIdx);
			HalconAPI.InitOCT(proc, 0);
			HalconAPI.InitOCT(proc, 1);
			HalconAPI.InitOCT(proc, 2);
			HalconAPI.InitOCT(proc, 3);
			int num = HalconAPI.CallProcedure(proc);
			num = HTuple.LoadNew(proc, 0, num, out row);
			num = HTuple.LoadNew(proc, 1, num, out column);
			num = HTuple.LoadNew(proc, 2, num, out index);
			num = HTuple.LoadNew(proc, 3, num, out pose);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Set point-based observation data in a calibration data model.
		///   Instance represents: Handle of a calibration data model.
		/// </summary>
		/// <param name="cameraIdx">Index of the observing camera. Default: 0</param>
		/// <param name="calibObjIdx">Index of the calibration object. Default: 0</param>
		/// <param name="calibObjPoseIdx">Index of the observed calibration object. Default: 0</param>
		/// <param name="row">Row coordinates of the extracted points.</param>
		/// <param name="column">Column coordinates of the extracted points.</param>
		/// <param name="index">Correspondence of the extracted points to the calibration marks of the observed calibration object. Default: "all"</param>
		/// <param name="pose">Roughly estimated pose of the observed calibration object relative to the observing camera.</param>
		// Token: 0x060001D9 RID: 473 RVA: 0x0000A83C File Offset: 0x00008A3C
		public void SetCalibDataObservPoints(int cameraIdx, int calibObjIdx, int calibObjPoseIdx, HTuple row, HTuple column, HTuple index, HTuple pose)
		{
			IntPtr proc = HalconAPI.PreCall(1975);
			base.Store(proc, 0);
			HalconAPI.StoreI(proc, 1, cameraIdx);
			HalconAPI.StoreI(proc, 2, calibObjIdx);
			HalconAPI.StoreI(proc, 3, calibObjPoseIdx);
			HalconAPI.Store(proc, 4, row);
			HalconAPI.Store(proc, 5, column);
			HalconAPI.Store(proc, 6, index);
			HalconAPI.Store(proc, 7, pose);
			int procResult = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(row);
			HalconAPI.UnpinTuple(column);
			HalconAPI.UnpinTuple(index);
			HalconAPI.UnpinTuple(pose);
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Query information about the relations between cameras, calibration objects, and calibration object poses.
		///   Instance represents: Handle of a calibration data model.
		/// </summary>
		/// <param name="itemType">Kind of referred object. Default: "camera"</param>
		/// <param name="itemIdx">Camera index or calibration object index (depending on the selected ItemType). Default: 0</param>
		/// <param name="index2">Calibration object numbers.</param>
		/// <returns>List of calibration object indices or list of camera indices (depending on ItemType).</returns>
		// Token: 0x060001DA RID: 474 RVA: 0x0000A8C8 File Offset: 0x00008AC8
		public HTuple QueryCalibDataObservIndices(string itemType, int itemIdx, out HTuple index2)
		{
			IntPtr proc = HalconAPI.PreCall(1976);
			base.Store(proc, 0);
			HalconAPI.StoreS(proc, 1, itemType);
			HalconAPI.StoreI(proc, 2, itemIdx);
			HalconAPI.InitOCT(proc, 0);
			HalconAPI.InitOCT(proc, 1);
			int num = HalconAPI.CallProcedure(proc);
			HTuple result;
			num = HTuple.LoadNew(proc, 0, HTupleType.INTEGER, num, out result);
			num = HTuple.LoadNew(proc, 1, HTupleType.INTEGER, num, out index2);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Query data stored or computed in a calibration data model.
		///   Instance represents: Handle of a calibration data model.
		/// </summary>
		/// <param name="itemType">Type of calibration data item. Default: "camera"</param>
		/// <param name="itemIdx">Index of the affected item (depending on the selected ItemType). Default: 0</param>
		/// <param name="dataName">The name of the inspected data. Default: "params"</param>
		/// <returns>Requested data.</returns>
		// Token: 0x060001DB RID: 475 RVA: 0x0000A934 File Offset: 0x00008B34
		public HTuple GetCalibData(string itemType, HTuple itemIdx, HTuple dataName)
		{
			IntPtr proc = HalconAPI.PreCall(1977);
			base.Store(proc, 0);
			HalconAPI.StoreS(proc, 1, itemType);
			HalconAPI.Store(proc, 2, itemIdx);
			HalconAPI.Store(proc, 3, dataName);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(itemIdx);
			HalconAPI.UnpinTuple(dataName);
			HTuple result;
			num = HTuple.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Query data stored or computed in a calibration data model.
		///   Instance represents: Handle of a calibration data model.
		/// </summary>
		/// <param name="itemType">Type of calibration data item. Default: "camera"</param>
		/// <param name="itemIdx">Index of the affected item (depending on the selected ItemType). Default: 0</param>
		/// <param name="dataName">The name of the inspected data. Default: "params"</param>
		/// <returns>Requested data.</returns>
		// Token: 0x060001DC RID: 476 RVA: 0x0000A9A0 File Offset: 0x00008BA0
		public HTuple GetCalibData(string itemType, int itemIdx, string dataName)
		{
			IntPtr proc = HalconAPI.PreCall(1977);
			base.Store(proc, 0);
			HalconAPI.StoreS(proc, 1, itemType);
			HalconAPI.StoreI(proc, 2, itemIdx);
			HalconAPI.StoreS(proc, 3, dataName);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HTuple result;
			num = HTuple.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Define a calibration object in a calibration model.
		///   Instance represents: Handle of a calibration data model.
		/// </summary>
		/// <param name="calibObjIdx">Calibration object index. Default: 0</param>
		/// <param name="calibObjDescr">3D point coordinates or a description file name.</param>
		// Token: 0x060001DD RID: 477 RVA: 0x0000AA00 File Offset: 0x00008C00
		public void SetCalibDataCalibObject(int calibObjIdx, HTuple calibObjDescr)
		{
			IntPtr proc = HalconAPI.PreCall(1978);
			base.Store(proc, 0);
			HalconAPI.StoreI(proc, 1, calibObjIdx);
			HalconAPI.Store(proc, 2, calibObjDescr);
			int procResult = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(calibObjDescr);
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Define a calibration object in a calibration model.
		///   Instance represents: Handle of a calibration data model.
		/// </summary>
		/// <param name="calibObjIdx">Calibration object index. Default: 0</param>
		/// <param name="calibObjDescr">3D point coordinates or a description file name.</param>
		// Token: 0x060001DE RID: 478 RVA: 0x0000AA4C File Offset: 0x00008C4C
		public void SetCalibDataCalibObject(int calibObjIdx, double calibObjDescr)
		{
			IntPtr proc = HalconAPI.PreCall(1978);
			base.Store(proc, 0);
			HalconAPI.StoreI(proc, 1, calibObjIdx);
			HalconAPI.StoreD(proc, 2, calibObjDescr);
			int procResult = HalconAPI.CallProcedure(proc);
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Set type and initial parameters of a camera in a calibration data model.
		///   Instance represents: Handle of a calibration data model.
		/// </summary>
		/// <param name="cameraIdx">Camera index. Default: 0</param>
		/// <param name="cameraType">Type of the camera. Default: []</param>
		/// <param name="cameraParam">Initial camera internal parameters.</param>
		// Token: 0x060001DF RID: 479 RVA: 0x0000AA90 File Offset: 0x00008C90
		public void SetCalibDataCamParam(HTuple cameraIdx, HTuple cameraType, HCamPar cameraParam)
		{
			IntPtr proc = HalconAPI.PreCall(1979);
			base.Store(proc, 0);
			HalconAPI.Store(proc, 1, cameraIdx);
			HalconAPI.Store(proc, 2, cameraType);
			HalconAPI.Store(proc, 3, cameraParam);
			int procResult = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(cameraIdx);
			HalconAPI.UnpinTuple(cameraType);
			HalconAPI.UnpinTuple(cameraParam);
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Set type and initial parameters of a camera in a calibration data model.
		///   Instance represents: Handle of a calibration data model.
		/// </summary>
		/// <param name="cameraIdx">Camera index. Default: 0</param>
		/// <param name="cameraType">Type of the camera. Default: []</param>
		/// <param name="cameraParam">Initial camera internal parameters.</param>
		// Token: 0x060001E0 RID: 480 RVA: 0x0000AAF8 File Offset: 0x00008CF8
		public void SetCalibDataCamParam(HTuple cameraIdx, string cameraType, HCamPar cameraParam)
		{
			IntPtr proc = HalconAPI.PreCall(1979);
			base.Store(proc, 0);
			HalconAPI.Store(proc, 1, cameraIdx);
			HalconAPI.StoreS(proc, 2, cameraType);
			HalconAPI.Store(proc, 3, cameraParam);
			int procResult = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(cameraIdx);
			HalconAPI.UnpinTuple(cameraParam);
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Create a HALCON calibration data model.
		///   Modified instance represents: Handle of the created calibration data model.
		/// </summary>
		/// <param name="calibSetup">Type of the calibration setup. Default: "calibration_object"</param>
		/// <param name="numCameras">Number of cameras in the calibration setup. Default: 1</param>
		/// <param name="numCalibObjects">Number of calibration objects. Default: 1</param>
		// Token: 0x060001E1 RID: 481 RVA: 0x0000AB5C File Offset: 0x00008D5C
		public void CreateCalibData(string calibSetup, int numCameras, int numCalibObjects)
		{
			this.Dispose();
			IntPtr proc = HalconAPI.PreCall(1980);
			HalconAPI.StoreS(proc, 0, calibSetup);
			HalconAPI.StoreI(proc, 1, numCameras);
			HalconAPI.StoreI(proc, 2, numCalibObjects);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}
	}
}
